package com.lighthouse.doc.operate.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lighthouse.doc.base.domain.KnowledgeDocBaseInfo;
import com.lighthouse.doc.base.domain.KnowledgeDocBaseInfoVo;
import com.ruoyi.common.utils.bean.BeanUtils;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 用户-文档操作关联对象 lh_rel_doc_operate
 * 
 * @author ysz
 * @date 2023-04-26
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class KnowledgeDocOperate extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 操作对象id */
    @Excel(name = "操作对象id")
    private String docId;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 是否点赞 */
    @Excel(name = "是否点赞")
    private String isLike;

    /** 是否收藏 */
    @Excel(name = "是否收藏")
    private String isCollect;

    /** 是否收藏 */
    @Excel(name = "是否下载")
    private String isDownload;

    /** 操作时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date operateTime;

    public void setDocId(String docId) 
    {
        this.docId = docId;
    }

    public String getDocId() 
    {
        return docId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setIsLike(String isLike) 
    {
        this.isLike = isLike;
    }

    public String getIsLike() 
    {
        return isLike;
    }
    public void setIsCollect(String isCollect) 
    {
        this.isCollect = isCollect;
    }

    public String getIsCollect() 
    {
        return isCollect;
    }

    public String getIsDownload() {
        return isDownload;
    }

    public void setIsDownload(String isDownload) {
        this.isDownload = isDownload;
    }

    public void setOperateTime(Date operateTime)
    {
        this.operateTime = operateTime;
    }

    public Date getOperateTime() 
    {
        return operateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("docId", getDocId())
            .append("userId", getUserId())
            .append("isLike", getIsLike())
            .append("isCollect", getIsCollect())
            .append("isDownload", getIsDownload())
            .append("operateTime", getOperateTime())
            .toString();
    }

    /**
     * 复制DTO生成实体类
     * @author ysz
     * @param knowledgeDocOperateDTO
     * @return
     **/
    public KnowledgeDocOperate copyDTOInfo(KnowledgeDocOperateDTO knowledgeDocOperateDTO) {
        BeanUtils.copyBeanProp(this, knowledgeDocOperateDTO);
        return this;
    }
}
